package com.wlz.bean;

import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;

/**
 * @author wlz
 * @date 2022-05-23  9:06 下午
 */
@Component
public class MyBeanInitAndDestroy implements InitializingBean, DisposableBean {
	@Override
	public void destroy() throws Exception {
		System.out.println("DisposableBean 的 destroy 方法。。。。。");
	}

	@Override
	public void afterPropertiesSet() throws Exception {
		System.out.println("InitializingBean 的 afterPropertiesSet 方法。。。。");
	}
}
